package com.luoran.bartalks.service;

import java.util.List;

import org.beetl.sql.core.annotatoin.Param;
import org.beetl.sql.core.engine.PageQuery;
import org.springframework.transaction.annotation.Transactional;

import com.luoran.bartalks.entity.BaseInfo;
import com.luoran.bartalks.entity.biz.BtMateriel;


public interface IBtMaterielService{
	
	PageQuery<? extends BaseInfo> getQueryList(PageQuery<? extends BaseInfo> pageQuery);
	
	//添加物料.返回主键
	@Transactional
	String addBtMateriel(BtMateriel btMateriel);
	
	//根据物料编码查询
	BtMateriel getMaterielByMaterielCode(String materielCode,String companyId);
	
	//根据主键查询
	BtMateriel getBtMateriel(String id);
	
	//根据物料类型ID查询物料
	 List<BtMateriel> getMaterielByTypeId(@Param("companyId") String companyId,@Param("typeId") String typeId);

	 //根据主键更新
	int updateMaterielById(BtMateriel btMateriel);

	//扫描货物时需要根据货物id和公司id校验货物
	BtMateriel getBtMaterielByIdAndCompanyId(String materielId, String companyId);
	 
	 

}
